# -*- coding: utf-8 -*-
# @Time    : 2020/12/7 上午12:22
# @Author  : lilong

from models.adaptation_mode.exp1.spec import HighPerson, AdaptationPerson


def canPlayReceptionist(person):
    """是否可以成为(高级酒店)接待员"""
    return person.getHeight() >= 165


def testPerson():

    # 正常的类实例化，及对象调用
    lira = HighPerson("Lira", 170)
    print(lira.getName() + "身高" + str(lira.getHeight()) + "，完美！")

    # 调用函数功能
    print("是否适合做接待员：", "符合" if canPlayReceptionist(lira) else "不符合")
    print()

    # 适配器重新封装以适配当下的标准接口
    demi = AdaptationPerson("Demi", 170, 2)
    print(demi.getName() + "身高，" + str(demi.getHeight()) + "在高跟鞋的适配下，身高不输高圆圆，气质不输范冰冰！")
    print("是否适合做接待员：", "符合" if canPlayReceptionist(demi) else "不符合")


testPerson()
